import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'

export const constantRoutes: RouteRecordRaw[] | any = [
  {
    path: '/',
    redirect: '/home'
  },
  // 主页
  {
    path: '/home',
    component: () => import('@/components/HelloWorld.vue'),
    hidden: true
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  scrollBehavior: () => ({ top: 0 }),
  routes: constantRoutes
})

export default router
